﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsolePostSharp
{
    class Program
    {
        static void Main(string[] args)
        {
           
            Orders order = new Orders();
            Console.WriteLine("请输入用户名：");
            User.UserID = Console.ReadLine();
            Console.WriteLine("请输入密码：");
            Console.ReadLine();
            string id;

        LRedo:
            Console.WriteLine("请输入您要执行的操作：A 新增； D 删除； X 退出");
            string opt = Console.ReadLine();

            if (opt.ToLower() == "a")
            {
                Console.WriteLine("请输入订单编号：");
                id = Console.ReadLine();
                Console.WriteLine("请输入订单名称：");
                string name = Console.ReadLine();
                order.Add(id, name);
            }
            else if (opt.ToLower() == "d")
            {
                Console.WriteLine("请输入订单号：");
                id = Console.ReadLine();
                order.Delete(id);
            }
            else if (opt.ToLower() == "x")
            {

            }
            else
            {
                Console.WriteLine("您输入不正确，请重新输入：");
                goto LRedo;
            }

            Console.WriteLine("按任意键退出……");
            Console.ReadKey();
        }

    }
}
